.class public Lcom/waiqin365/base/db/seniorvisitcache/f;
.super Ljava/lang/Object;


# static fields
.field private static a:Lcom/waiqin365/base/db/seniorvisitcache/f;


# instance fields
.field private b:Lcom/waiqin365/base/db/seniorvisitcache/a;

.field private c:Lcom/waiqin365/base/db/seniorvisitcache/d;

.field private d:Landroid/database/sqlite/SQLiteDatabase;

.field private e:Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;


# direct methods
.method private constructor <init>(Landroid/content/Context;)V
    .locals 3

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Lcom/waiqin365/base/db/seniorvisitcache/b;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v2, Lcom/fiberhome/gaea/client/b/a/a;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, "visitcache.db"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x0

    invoke-direct {v0, p1, v1, v2}, Lcom/waiqin365/base/db/seniorvisitcache/b;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;)V

    invoke-virtual {v0}, Lcom/waiqin365/base/db/seniorvisitcache/b;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->d:Landroid/database/sqlite/SQLiteDatabase;

    new-instance v0, Lcom/waiqin365/base/db/seniorvisitcache/a;

    iget-object v1, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->d:Landroid/database/sqlite/SQLiteDatabase;

    invoke-direct {v0, v1}, Lcom/waiqin365/base/db/seniorvisitcache/a;-><init>(Landroid/database/sqlite/SQLiteDatabase;)V

    iput-object v0, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->b:Lcom/waiqin365/base/db/seniorvisitcache/a;

    iget-object v0, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->b:Lcom/waiqin365/base/db/seniorvisitcache/a;

    sget-object v1, Lde/greenrobot/dao/identityscope/IdentityScopeType;->None:Lde/greenrobot/dao/identityscope/IdentityScopeType;

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/seniorvisitcache/a;->a(Lde/greenrobot/dao/identityscope/IdentityScopeType;)Lcom/waiqin365/base/db/seniorvisitcache/d;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->c:Lcom/waiqin365/base/db/seniorvisitcache/d;

    iget-object v0, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->c:Lcom/waiqin365/base/db/seniorvisitcache/d;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/seniorvisitcache/d;->a()Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->e:Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;

    return-void
.end method

.method public static declared-synchronized a(Landroid/content/Context;)Lcom/waiqin365/base/db/seniorvisitcache/f;
    .locals 2

    const-class v1, Lcom/waiqin365/base/db/seniorvisitcache/f;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/waiqin365/base/db/seniorvisitcache/f;->a:Lcom/waiqin365/base/db/seniorvisitcache/f;

    if-nez v0, :cond_0

    new-instance v0, Lcom/waiqin365/base/db/seniorvisitcache/f;

    invoke-direct {v0, p0}, Lcom/waiqin365/base/db/seniorvisitcache/f;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/waiqin365/base/db/seniorvisitcache/f;->a:Lcom/waiqin365/base/db/seniorvisitcache/f;

    :cond_0
    sget-object v0, Lcom/waiqin365/base/db/seniorvisitcache/f;->a:Lcom/waiqin365/base/db/seniorvisitcache/f;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v1

    return-object v0

    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method


# virtual methods
.method public a(Ljava/lang/String;)Ljava/util/List;
    .locals 4

    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->e:Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;->queryBuilder()Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v0

    sget-object v1, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->b:Lde/greenrobot/dao/Property;

    invoke-virtual {v1, p1}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v1

    const/4 v2, 0x0

    new-array v2, v2, [Lde/greenrobot/dao/query/WhereCondition;

    invoke-virtual {v0, v1, v2}, Lde/greenrobot/dao/query/QueryBuilder;->where(Lde/greenrobot/dao/query/WhereCondition;[Lde/greenrobot/dao/query/WhereCondition;)Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v0

    const/4 v1, 0x1

    new-array v1, v1, [Lde/greenrobot/dao/Property;

    const/4 v2, 0x0

    sget-object v3, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->f:Lde/greenrobot/dao/Property;

    aput-object v3, v1, v2

    invoke-virtual {v0, v1}, Lde/greenrobot/dao/query/QueryBuilder;->orderAsc([Lde/greenrobot/dao/Property;)Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v0

    invoke-virtual {v0}, Lde/greenrobot/dao/query/QueryBuilder;->list()Ljava/util/List;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v0

    :try_start_1
    monitor-exit p0

    :goto_0
    return-object v0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    const/4 v0, 0x0

    monitor-exit p0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v0
.end method

.method public a(Lcom/waiqin365/base/db/seniorvisitcache/e;)Z
    .locals 1

    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->e:Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;

    invoke-virtual {v0, p1}, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;->insertOrReplace(Ljava/lang/Object;)J
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    const/4 v0, 0x1

    :try_start_1
    monitor-exit p0

    :goto_0
    return v0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    const/4 v0, 0x0

    monitor-exit p0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v0
.end method

.method public a(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 9

    const/4 v0, 0x1

    const/4 v1, 0x0

    monitor-enter p0

    :try_start_0
    const-string/jumbo v2, "|"

    invoke-virtual {p2, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_0

    const/4 v2, 0x0

    const-string/jumbo v3, "|"

    invoke-virtual {p2, v3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v3

    invoke-virtual {p2, v2, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v2

    const-string/jumbo v3, "|"

    invoke-virtual {p2, v3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v3

    add-int/lit8 v3, v3, 0x1

    invoke-virtual {p2, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v3

    iget-object v4, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->e:Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;

    invoke-virtual {v4}, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;->queryBuilder()Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v4

    sget-object v5, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->b:Lde/greenrobot/dao/Property;

    invoke-virtual {v5, p1}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v5

    const/4 v6, 0x2

    new-array v6, v6, [Lde/greenrobot/dao/query/WhereCondition;

    const/4 v7, 0x0

    sget-object v8, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->c:Lde/greenrobot/dao/Property;

    invoke-virtual {v8, v2}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v2

    aput-object v2, v6, v7

    const/4 v2, 0x1

    sget-object v7, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->f:Lde/greenrobot/dao/Property;

    invoke-virtual {v7, v3}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v3

    aput-object v3, v6, v2

    invoke-virtual {v4, v5, v6}, Lde/greenrobot/dao/query/QueryBuilder;->where(Lde/greenrobot/dao/query/WhereCondition;[Lde/greenrobot/dao/query/WhereCondition;)Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v2

    invoke-virtual {v2}, Lde/greenrobot/dao/query/QueryBuilder;->buildDelete()Lde/greenrobot/dao/query/DeleteQuery;

    move-result-object v2

    invoke-virtual {v2}, Lde/greenrobot/dao/query/DeleteQuery;->executeDeleteWithoutDetachingEntities()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :goto_0
    :try_start_1
    monitor-exit p0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :goto_1
    return v0

    :cond_0
    :try_start_2
    iget-object v2, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->e:Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;

    invoke-virtual {v2}, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;->queryBuilder()Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v2

    sget-object v3, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->b:Lde/greenrobot/dao/Property;

    invoke-virtual {v3, p1}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v3

    const/4 v4, 0x1

    new-array v4, v4, [Lde/greenrobot/dao/query/WhereCondition;

    const/4 v5, 0x0

    sget-object v6, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->c:Lde/greenrobot/dao/Property;

    invoke-virtual {v6, p2}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v6

    aput-object v6, v4, v5

    invoke-virtual {v2, v3, v4}, Lde/greenrobot/dao/query/QueryBuilder;->where(Lde/greenrobot/dao/query/WhereCondition;[Lde/greenrobot/dao/query/WhereCondition;)Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v2

    invoke-virtual {v2}, Lde/greenrobot/dao/query/QueryBuilder;->buildDelete()Lde/greenrobot/dao/query/DeleteQuery;

    move-result-object v2

    invoke-virtual {v2}, Lde/greenrobot/dao/query/DeleteQuery;->executeDeleteWithoutDetachingEntities()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_0

    :catch_0
    move-exception v0

    :try_start_3
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    monitor-exit p0

    move v0, v1

    goto :goto_1

    :catchall_0
    move-exception v0

    monitor-exit p0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    throw v0
.end method

.method public b(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 7

    const/4 v0, 0x1

    const/4 v1, 0x0

    monitor-enter p0

    :try_start_0
    iget-object v2, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->e:Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;

    invoke-virtual {v2}, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;->queryBuilder()Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v2

    sget-object v3, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->b:Lde/greenrobot/dao/Property;

    invoke-virtual {v3, p1}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v3

    const/4 v4, 0x1

    new-array v4, v4, [Lde/greenrobot/dao/query/WhereCondition;

    const/4 v5, 0x0

    sget-object v6, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->f:Lde/greenrobot/dao/Property;

    invoke-virtual {v6, p2}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v6

    aput-object v6, v4, v5

    invoke-virtual {v2, v3, v4}, Lde/greenrobot/dao/query/QueryBuilder;->where(Lde/greenrobot/dao/query/WhereCondition;[Lde/greenrobot/dao/query/WhereCondition;)Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v2

    invoke-virtual {v2}, Lde/greenrobot/dao/query/QueryBuilder;->buildDelete()Lde/greenrobot/dao/query/DeleteQuery;

    move-result-object v2

    invoke-virtual {v2}, Lde/greenrobot/dao/query/DeleteQuery;->executeDeleteWithoutDetachingEntities()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :try_start_1
    monitor-exit p0

    :goto_0
    return v0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    monitor-exit p0

    move v0, v1

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v0
.end method

.method public c(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 5

    const/4 v0, 0x0

    monitor-enter p0

    :try_start_0
    iget-object v1, p0, Lcom/waiqin365/base/db/seniorvisitcache/f;->e:Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;

    invoke-virtual {v1}, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao;->queryBuilder()Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v1

    sget-object v2, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->b:Lde/greenrobot/dao/Property;

    invoke-virtual {v2, p1}, Lde/greenrobot/dao/Property;->eq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v2

    sget-object v3, Lcom/waiqin365/base/db/seniorvisitcache/SVCacheInfoDao$Properties;->d:Lde/greenrobot/dao/Property;

    invoke-virtual {v3, p2}, Lde/greenrobot/dao/Property;->notEq(Ljava/lang/Object;)Lde/greenrobot/dao/query/WhereCondition;

    move-result-object v3

    const/4 v4, 0x0

    new-array v4, v4, [Lde/greenrobot/dao/query/WhereCondition;

    invoke-virtual {v1, v2, v3, v4}, Lde/greenrobot/dao/query/QueryBuilder;->whereOr(Lde/greenrobot/dao/query/WhereCondition;Lde/greenrobot/dao/query/WhereCondition;[Lde/greenrobot/dao/query/WhereCondition;)Lde/greenrobot/dao/query/QueryBuilder;

    move-result-object v1

    invoke-virtual {v1}, Lde/greenrobot/dao/query/QueryBuilder;->buildDelete()Lde/greenrobot/dao/query/DeleteQuery;

    move-result-object v1

    invoke-virtual {v1}, Lde/greenrobot/dao/query/DeleteQuery;->executeDeleteWithoutDetachingEntities()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    const/4 v0, 0x1

    :try_start_1
    monitor-exit p0

    :goto_0
    return v0

    :catch_0
    move-exception v1

    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    monitor-exit p0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v0
.end method
